﻿using Colorful.Furniture.Enum;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace Colorful.Furniture.ErpOrderManagement;


/// <summary>
/// 创建充值订单输入体
/// </summary>
public class CreateRechargeOrderInputDto
{
    /// <summary>
    /// 合作商户号
    /// </summary>
    [RegularExpression(RegexSet.IntegerRegex, ErrorMessage = "请输入正确的合作商户号")]
    [Required(ErrorMessage = "请输入合作商户号")]
    public int? MerchantId { get; set; }

    /// <summary>
    /// 合作商唯一订单号
    /// </summary>
    [Required(ErrorMessage = "请输入合作商户号")]
    public string OutTradeNo { get; set; }

    /// <summary>
    /// 商品编码
    /// </summary>
    [Required(ErrorMessage = "请输入商品编码")]
    public string ProductNo { get; set; }

    /// <summary>
    /// 充值账号(此处为单个账号，匹配accountType)
    /// </summary>
    [Required(ErrorMessage = "请输入充值账号")]
    public string RechargeAccount { get; set; }
    
    /// <summary>
    /// 数量
    /// </summary>
    [Required(ErrorMessage = "请输入数量")]
    [RegularExpression(RegexSet.IntegerRegex, ErrorMessage = "请输入正确的数量")]
    public int? Number { get; set; }

    /// <summary>
    /// 回调地址
    /// </summary>
    [Required(ErrorMessage = "请输入回调地址")]
    public string NotifyUrl { get; set; }

    /// <summary>
    /// 签名
    /// </summary>
    [Required(ErrorMessage = "请输入签名")]
    public string Sign { get; set; }

    /// <summary>
    ///  终端客户IP
    /// </summary>
    public string EndCustomerIp { get; set; }


}


/// <summary>
/// redis订单输入体
/// </summary>
public class RedisOrderInputDto
{
    /// <summary>
    /// 合作商户号
    /// </summary>
    public int? MerchantId { get; set; }

    /// <summary>
    /// 合作商唯一订单号
    /// </summary>
    public string OutTradeNo { get; set; }

    /// <summary>
    /// 商品编码
    /// </summary>
    public string ProductNo { get; set; }

    /// <summary>
    /// 充值账号(此处为单个账号，匹配accountType)
    /// </summary>
    public string RechargeAccount { get; set; }
    
    /// <summary>
    /// 数量
    /// </summary>
    public int? Number { get; set; }

    /// <summary>
    /// 回调地址
    /// </summary>
    public string NotifyUrl { get; set; }

    /// <summary>
    /// 签名
    /// </summary>
    public string Sign { get; set; }

    /// <summary>
    ///  终端客户IP
    /// </summary>
    public string EndCustomerIp { get; set; }

    /// <summary>
    ///  下游充值时间
    /// </summary>
    public string RechargeTime { get; set; }
    
    /// <summary>
    /// 店铺实际支付金额 
    /// </summary>
    public decimal PayAmount { get; set; }
    

}



/// <summary>
/// 订单检查返回结果
/// </summary>
public class CheckOrderDto
{
    /// <summary>
    /// 返回描述
    /// </summary>
    public string Message { get; set; }

    /// <summary>
    /// 客户编号
    /// </summary>
    public Guid? CustomerId { get; set; }

    /// <summary>
    ///   客户编号
    /// </summary>
    public int? CustomerCode { get; set; }

    /// <summary>
    ///   客户名字
    /// </summary>
    public string CustomerName { get; set; }

    /// <summary>
    /// 产品Id
    /// </summary>
    public Guid? ProductId { get; set; }

    /// <summary>
    ///   产品名字
    /// </summary>
    public string ProductName { get; set; }

    /// <summary>
    ///  产品编号 
    /// </summary>
    public string ProductNo { get; set; }

    /// <summary>
    ///  面额
    /// </summary>
    public string FaceRemark { get; set; }

    /// <summary>
    /// 面值
    /// </summary>
    public decimal? FaceAmount { get; set; }

    /// <summary>
    ///  提单前金额备注
    /// </summary>
    public string PriceRemark { get; set; }

    /// <summary>
    /// 单价
    /// </summary>
    public decimal? Price { get; set; }

    /// <summary>
    /// 合计金额
    /// </summary>
    public decimal? TotalPrice { get; set; }

    /// <summary>
    ///  服务费
    /// </summary>
    public decimal? ServiceFee { get; set; }

    /// <summary>
    ///  产品类型
    /// </summary>
    public ProductType? ProductType { get; set; }

}
